package cn.wuyi.common.pojo.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Transient;

import cn.wuyi.common.pojo.view.McUserInfoView;


/**
 * @description: 实体类基础类
 * @version 1.0.0
 */
public class BaseEntity implements Serializable {

	private static final long serialVersionUID = -7383391444275138625L;
	@Id
	private Long id;

	/** 
	 * 起始页数 - 微服务化项目需要的字段
	 */
	@Transient
	private Integer startIndex = 1;
	
	/**
	 *  分页记录数 - 微服务化项目需要的字段
	 */
	@Transient
	private Integer pageSize = 10;
	
	
	/**
	 *  动态列表排序依据，比如：dto.setOrder("create_time");
	 */
	@Transient
	private String orderBy = null;
	
	private Date createTime;
	
	@Transient
	private Long createUserId;
	
	@Transient
	private String createUserName;
	
	private Date updateTime;
	@Transient
	private Long updateUserId;
	
	@Transient
	private String updateUserName;
	
	@Transient
	private Integer deleteFlag;               // 0 删除 | 1 未删除 数据库记录默认未删除
	
	@Transient
	private McUserInfoView userCache ;

	/*
	* 分布式事务 xid
	* */
	@Transient
	private String commodityCode;
	@Transient
	private Long tid; // 租户id

	public McUserInfoView getUserCache() {
		return userCache;
	}
	public void setUserCache(McUserInfoView userCache) {
		this.userCache = userCache;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Long getCreateUserId() {
		return createUserId;
	}
	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}
	public String getCreateUserName() {
		return createUserName;
	}
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Long getUpdateUserId() {
		return updateUserId;
	}
	public void setUpdateUserId(Long updateUserId) {
		this.updateUserId = updateUserId;
	}
	public String getUpdateUserName() {
		return updateUserName;
	}
	public void setUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}
	public Integer getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	public Integer getStartIndex() {
		return startIndex;
	}
	public void setStartIndex(Integer startIndex) {
		this.startIndex = startIndex;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getOrderBy() {
		return orderBy;
	}
	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}
	public String getCommodityCode() {
		return commodityCode;
	}
	public void setCommodityCode(String commodityCode) {
		this.commodityCode = commodityCode;
	}
	public Long getTid() {
		return tid;
	}
	public void setTid(Long tid) {
		this.tid = tid;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
}
